import login from "@/views/login/login.vue";
import frame from "@/views/main/frame.vue";
import myabsent from "@/views/absent/my.vue";
import subabsent from "@/views/absent/sub.vue";
import publish from "@/views/inform/publish.vue";
import inform_list from "@/views/inform/list.vue";
import inform_detail from "@/views/inform/detail.vue";
import staffadd from "@/views/staff/add.vue";
import stafflist from "@/views/staff/list.vue";
import home from "@/views/home/home.vue";
import absent from "@/views/absent/index.vue";

const routers = [
  {
    path: "/",
    name: "frame",
    component: frame,
    children: [
      {
        path: "/",
        name: "home",
        component: home,
        meta: {
          icon: "HomeFilled",
          text: "首页",
        },
      },
      {
        path: "/absent",
        name: "absent",
        component: absent,
        meta: {
          icon: "Checked",
          text: "考勤管理",
        },
        children: [
          { path: "/my", name: "myabsent", component: myabsent },
          { path: "/sub", name: "subabsent", component: subabsent },
        ],
      },

      { path: "/inform/publish", name: "inform_publish", component: publish },
      { path: "/inform/list", name: "inform_list", component: inform_list },
      {
        path: "/inform/detail/:pk",
        name: "inform_detail",
        component: inform_detail,
      },
      { path: "/staff/add", name: "staff_add", component: staffadd },
      { path: "/staff/list", name: "staff_list", component: stafflist },
    ],
  },
  {
    path: "/login",
    name: "login",
    component: login,
  },
];
